package com.xq.chrome.eurekaconsumer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author MACHENIKE
 */
@RestController
public class ConsumerController {

  @Autowired
  ConsumerService consumerService;
  @Autowired
  FeignConsumerService feignConsumerService;

  @RequestMapping("/getPing")
  public String ping() {
    return consumerService.getPing();
  }

  @RequestMapping("/getPing2")
  public String ping2() {
    return consumerService.getPing2("1111");
  }

  @RequestMapping("/getPing3")
  public String ping3() {
    return feignConsumerService.getOk();
  }
}
